package com.homedo.odin.solution.model.request.mng.column;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;

@ApiModel(description = "新增栏目关联sku")
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class AddColumnRelevanceSkuRequestBean {

    @ApiModelProperty(value = "操作人userName", required = true)
    @NotEmpty(message = "操作人userName不能为空")
    private String userName;

    @ApiModelProperty(value = "栏目编号", required = true)
    @NotNull(message = "栏目编号不能为空")
    @Min(message = "栏目编号非法", value = 0)
    private Long columnId;


    @ApiModelProperty(value = "栏目sku", required = true)
    @Valid /*关联校验*/
    @Size(message = "栏目sku  columnSkuList不能为空", min = 1)
    private List<ColumnSkuRequestBean> columnSkuList;

}
